package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.entity.ProductAttrValueEntity;
import com.atguigu.gulimall.product.entity.vo.AttrGroupRelationVo;
import com.atguigu.gulimall.product.entity.vo.AttrRespVo;
import com.atguigu.gulimall.product.entity.vo.AttrVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author xuweixing
 * @email xuweixing@gmail.com
 * @date 2021-05-08 17:02:39
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVO attr);

    AttrRespVo getAttrDetail(Long attrId);

    void updateAttrById(AttrVO attr);

    PageUtils queryPageBtCatId(Map<String, Object> params, Long catId, String type);

    List<AttrEntity> getRelationAttr(Long attrGroupId);

    PageUtils getNoRelationAttr(Long attrGroupId,Map<String, Object> params);

    List<ProductAttrValueEntity> listforspu(Long spuId);

    void updatespuattr(Long spuId, List<ProductAttrValueEntity> entitys);

    List<Long> getSearchAttrIds(List<Long> attrids);
}

